package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.GoodsSpec;
import com.ruoyi.system.domain.vo.GoodsSpecVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsSpecMapper extends BaseMapper<GoodsSpec> {


    @Select("select * from app_goods_spec where goods_id=#{goodsId}")
    List<GoodsSpecVo> queryGoodsSpec(@Param("goodsId")Long goodsId);

    @Delete("delete from app_goods_spec where goods_id=#{id}")
    void deleteByGoodsId(@Param("id") Long id);

    void insertBatch(@Param("list") List<GoodsSpecVo> specList,@Param("goodsId")Long goodsId);
}
